package com.shark.teach;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @auther shark
 * @create 2024-10-07 21:32
 */
public class ConcurrentHashMapPrinciple
{
    public static void main(String[] args)
    {
        /*System.out.println("AA".hashCode());
        System.out.println("BB".hashCode());*/

        System.out.println("Aa".hashCode());
        System.out.println("BB".hashCode());

        System.out.println("Aa".equals("BB"));

        HashMap<Object, Object> hashMap = new HashMap<>();

        hashMap.put(1,"a");
        hashMap.put(1,"b");

        ConcurrentHashMap<Object, Object> concurrentHashMap = new ConcurrentHashMap<>();

        concurrentHashMap.put(2,"b");

    }

    private static void reviewHashCode()
    {
        System.out.println("AA".hashCode());
        System.out.println("BB".hashCode());

        System.out.println();

        System.out.println("Aa".hashCode());
        System.out.println("BB".hashCode());


        System.out.println("Aa".equals("BB"));
    }
}
